export default function getQuery (url: string) {
  let o: anyObj = {}
  if (window && window.URL) {
    let data = new URL(url).searchParams
    data?.forEach((value, key) => {
      o.key = value
    })
    return o
  }
  return null
}
